var angular = require('angular');
var menu = require('../../templates/menu.html');

angular.module('menuDirectiveModule', []).directive('appMenu', appMenuFn);

appMenuFn.$inject = [];

function appMenuFn() {
    return {
        restrict: 'AE',
        scope: {},
        replace: true,
        template: menu,
        controller: function ($scope, $element, $attrs, $transclude) {
            $scope.urlDatas = [{
                link: 'home',
                title: '首页',
                iconSrc: require('../../images/icon_bottom__0.png')
            }, {
                link: 'categories',
                title: '分类',
                iconSrc: require('../../images/icon_bottom__1.png')
            }, {
                link: 'proList',
                title: '发现',
                iconSrc: require('../../images/icon_bottom__2.png')
            }, {
                link: 'shopCart',
                title: '购物车',
                iconSrc: require('../../images/icon_bottom__3.png')
            }, {
                link: 'user',
                title: '我的',
                iconSrc: require('../../images/icon_bottom__4.png')
            }]
        }
    }
}